Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add deferred FKs to SQLite #70

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

robkinyon
Copy link

t/60roundtrip.t is failing, but it fails when I back out my changes as well. It also fails for non-SQLite producers. So, I'm not certain what's going on there.

@@ -425,7 +425,7 @@ table_constraint : PRIMARY_KEY parens_field_list conflict_clause(?)
}
}
|
FOREIGN_KEY parens_field_list REFERENCES ref_def cascade_def(?)
FOREIGN_KEY parens_field_list REFERENCES ref_def cascade_def(?) deferrable(?) deferred(?)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unlike PostgreSQL, the INITIALLY (DEFERRED|IMMEDIATE) clause in SQLite is part of the (NOT)? DEFERRABLE clause. See https://sqlite.org/syntax/foreign-key-clause.html.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've updated the PR accordingly. All tests are passing.

On Wed, Sep 16, 2015 at 7:12 PM, Dagfinn Ilmari Mannsåker <
notifications@github.com> wrote:

In lib/SQL/Translator/Parser/SQLite.pm
#70 (comment):

@@ -425,7 +425,7 @@ table_constraint : PRIMARY_KEY parens_field_list conflict_clause(?)
}
}
|

  • FOREIGN_KEY parens_field_list REFERENCES ref_def cascade_def(?)
  • FOREIGN_KEY parens_field_list REFERENCES ref_def cascade_def(?) deferrable(?) deferred(?)

Unlike PostgreSQL, the INITIALLY (DEFERRED|IMMEDIATE) clause in SQLite is
part of the (NOT)? DEFERRABLE clause. See
https://sqlite.org/syntax/foreign-key-clause.html.


Reply to this email directly or view it on GitHub
https://github.com/dbsrgits/sql-translator/pull/70/files#r39672522.

Thanks,
Rob Kinyon
http://greenfishbluefish.com/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants